const express = require("express");

let app = express();

let data = {
  age: "200",
  name: "jsonp",
};
app.get("/api/jsonp", function (req, res) {
  const { cb } = req.query;
  //返回调用的函数
  res.end(`${cb}(${JSON.stringify(data)})`);
});
app.listen(3000, function () {
  console.log("服务器已经启动好了，端口号是3000");
});
